package cn.com.cym.gamezao.entity.authorize;

import cn.com.cym.gamezao.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * 用户登录日志
 */
@Table(name="a_user_login_log")
@Entity
@Getter
@Setter
@Accessors(chain = true)
@NoArgsConstructor
@ApiModel(description = "用户登录日志")
public class UserLoginLog extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -8738565818470073883L;


    /**
     * 登录次数
     */
    @Min(value = 0L)
    @ApiModelProperty(value = "登录次数",required = true,dataType = "Long")
    private Long loginTimes;


    /**
     * 登录ip
     */
    @Column(length = 15)
    @ApiModelProperty(value = "登录ip",required = true,dataType = "String")
    private String loginIp;


    /**
     * 用户名
     */
    @Column(length = 60)
    @ApiModelProperty(value = "用户名",required = true,dataType = "String")
    private String userName;



    /**
     * 是否为异常登录(有系统计算)
     */
    @ApiModelProperty(value = "是否为异常登录",dataType = "Boolean")
    private Boolean diffLogin;
}
